﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace IMDTO
{
    public class IMDTONaturalPerson
    {
        public int idNaturalPerson { get; set; }
        public int idEmployer { get; set; }
        public int NaturalPerson { get; set; }
        public int version { get; set; }
        public string INSS { get; set; }
        public IMDTOName Name { get; set; }
        public int Sex { get; set; }
        public string Nationality { get; set; }
        public DateTime Birthdate { get; set; }
        public string Birthplace { get; set; }
        public string BirthPlaceCountry { get; set; }
        public int Language { get; set; }
        public IMDTOAddress Address { get; set; }

        public IMDTONaturalPerson()
        {
        }

        public IMDTONaturalPerson(NaturalPerson np)
        {
            this.Address = new IMDTOAddress(np.Address);
            
            this.Birthdate = np.Birthdate;
            this.Birthplace = np.BirthPlace;
            this.BirthPlaceCountry = np.BirthPlaceCountry.ToString();
            this.idEmployer = 0;
            this.idNaturalPerson = np.idNaturalPerson;
            this.INSS = np.INSS;
            this.Language = np.Language;
            
            this.Name = new IMDTOName(np.Name);
            
            this.Nationality= np.Nationality.ToString();
            this.Sex= np.Sex;
            this.version= np.version;
            this.NaturalPerson = np.idNaturalPersonVersion;


        }
    }
}
